package st.lib.base;

import android.content.Context;

import st.lib.base.util.utilcode.util.Utils;

/**
 * @author zhangyu
 * @date 2018/9/20
 */

public final class Shadow {
    public static Configurator getConfigurator() {
        return Configurator.getInstance();
    }
    public static <T> T getConfiguration(Object key) {
        return getConfigurator().getConfiguration(key);
    }
    public static Configurator init(Context context) {
        getConfigurator().getShadowConfigs().put(ConfigType.APPLICATION_CONTEXT, context.getApplicationContext());
        Utils.init(context);
        return Configurator.getInstance();
    }
    public static Context getApplication() {
        return getConfiguration(ConfigType.APPLICATION_CONTEXT);
    }
}
